From 15f6b230e351fa64b380ca1986724812c5b70a0f Mon Sep 17 00:00:00 2001 From: "iap10@freefall.cl.cam.ac.uk" Date: Thu, 10 Mar 2005 14:35:37 +0000 Subject: [PATCH] bitkeeper revision 1.1159.258.36 (42305b3948mU75urrgzQftpV3eNPbg) Tidy up ugly warning in debug builds from xc_linux_restore. Signed-off-by: ian@xensource.com --- tools/libxc/xc_linux_restore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 1db39317de..46373a2806 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -123,7 +123,7 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt) /* A temporary mapping of the guest's suspend record. */ suspend_record_t *p_srec; - char *region_base; + char *region_base, *p_gdt; mmu_t *mmu = NULL; @@ -565,6 +565,13 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt) ctxt.gdt_frames[i] = pfn_to_mfn_table[pfn]; } + /* Zero hypervisor GDT entries (supresses ugly warning) */ + p_gdt = xc_map_foreign_range( + xc_handle, dom, PAGE_SIZE, PROT_WRITE, ctxt.gdt_frames[0]); + memset( p_gdt + FIRST_RESERVED_GDT_ENTRY*8, 0, + NR_RESERVED_GDT_ENTRIES*8 ); + munmap( p_gdt, PAGE_SIZE ); + /* Uncanonicalise the page table base pointer. */ pfn = ctxt.pt_base >> PAGE_SHIFT; if ( (pfn >= nr_pfns) || ((pfn_type[pfn]<ABTYPE_MASK) != L2TAB) ) -- 2.30.2